extends "../i_TD_scope/i_TD_scope.gd"

func init():
	.init()
	name = "加长望远镜"
	resetdata()
	info = "极致眺望：<战场勘察>改为对全体队友起效；普攻击中五次后，随随机敌人造成一次普攻（必定暴击可miss），之后停止攻击1s\n" + info

func _connect():
	._connect()
	masCha.connect("onAtkChara",self,"cantmiss")

func cantmiss(atkinfo):
	if atkinfo.atkType == Chara.AtkType.NORMAL && norc % 5 == 0 && norc:
		atkinfo.isCri = true
	if atkinfo.atkType == Chara.AtkType.NORMAL && !atkinfo.isMiss:
		norc += 1
		if norc % 5 == 0:
			var chas = masCha.getAllChas(1)
			chas.shuffle()
			masCha.hurtChara(chas[0],masCha.att.atk,Chara.HurtType.PHY,Chara.AtkType.NORMAL)
			masCha.addBuff(ctrl.b_xuanyun.new(0.5))